(function(angular) {
	'use strict';
	angular.module("fs.waf").factory("companyClassService", companyClassService);
	companyClassService.$inject = [ '$q', 'loggerFactory','ajaxServiceFactory' ];
	function companyClassService($q, loggerFactory,ajaxServiceFactory) {
		var log = loggerFactory.getLogger("companyClassService");
		var ajaxService = ajaxServiceFactory.buildAjaxService({
			getDataStatus : {
				url : 'do/cda/dataList/dataStatus',
				method : 'get'
			}
		});
		
		function getDataStatus() {
			var defer = $q.defer();
			ajaxService.getDataStatus().then(function(response) {
				defer.resolve(response ? response.data : {});
			});
			return defer.promise;
		};
		
		function initOptionForSearch(ctrl){
			var defer1 = $q.defer();
			ajaxService.getDataStatus().then(function(response) {
				defer1.resolve(response ? response.data : {});
			}, angular.noop);
			return $q.all({
				dataStatusOptions : defer1.promise
			});
		};
		
		return {
			initOptionForSearch : initOptionForSearch
		};
	}
})(angular);